package com.yangjian.service;

import com.yangjian.bean.ShoppingCart;

import java.util.List;

public interface ShoppingCartService {

    /**
     * 添加购物车
     * @param shoppingCart
     * @return
     */
    ShoppingCart add(ShoppingCart shoppingCart);

    /**
     * 根据用户id查询购物车
     * @param uid
     * @return
     */
    List<ShoppingCart> findByUserUd(Long uid);


    /**
     * 修改购物车
     * @param shoppingCart
     * @return
     */
    int  update(ShoppingCart shoppingCart);

    /**
     * 清空购物车
     * @param uid
     * @return
     */
    int delete(Long uid);

}
